#include <stdio.h>
#include <stdlib.h>
#include <math.h>

double mypower(double base, int exp)
{
    int result = base;
    int i;
    if (exp == 0) {
        return 1;
    }
    
    for(i = 1; i < exp; i++){
        result = result * base;
    }
    return result;
}
int main(int argc, char *argv[])
{
    if (argc < 3){
        printf("Usage: %s base exp \n", argv[0]);
        return 1;
    }
    double base = atof(argv[1]);
    int exp = atoi(argv[2]);
    double result = pow(base, exp);
    printf("%g ^ %d is %g\n", base, exp, result);
    return 0;
}
